<table width="85%">
<?php
$selectedTeams = getSelectedTeams($leagueId);
$count = count($selectedTeams);
for ($i = 0; $i < $count; $i++) {
?>
	<tr>
	<td>
		<h2><?echo $selectedTeams[$i]->teamName?></h2>
		<table width="100%" cellspacing="10">
			<tr>
				<td width="5%"><b>B:</b>
				<td width="30%"><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('LBP'), null);?></td><td width="2%">|</td>
				<td width="30%"><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('FB'), null);?></td><td width="2%">|</td>
				<td width="30%"><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('RBP'), null);?></td>
			</tr>
			<tr>
				<td><b>HB:</b>			
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('LHBF'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('CHB'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('RHBF'), null);?></td>
			</tr>			
			<tr>
				<td><b>C:</b>			
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('LW'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('C'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('RW'), null);?></td>
			</tr>			
			<tr>
				<td><b>HF:</b>			
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('LHFF'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('CHF'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('RHFF'), null);?></td>
			</tr>			
			<tr>
				<td><b>F:</b>			
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('LFP'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('FF'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('RFP'), null);?></td>
			</tr>			
			<tr>
				<td><b>R:</b>			
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('R'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('F1'), null);?><td>|</td>
				<td><? echo getPlayerDisplay($selectedTeams[$i]->getPlayer('F2'), null);?></td>
			</tr>
			<tr>
				<td valign="top"><b>RES:</b></td>
				<td colspan="5">
				<?
				$ltis = $selectedTeams[$i]->getLti();
				$ltiCount = count($ltis);
		
				$reserves = $selectedTeams[$i]->getReserves();
				$count2 = count($reserves);
				for ($j = 0; $j < $count2; $j++) {
					if ($j > 0) {
						echo ", ";
					}
					echo getPlayerDisplay($reserves[$j], null);
				}
				?>
				</td>
			</tr>
			<?if ($ltiCount > 0) {?>	
			<tr>
				<td><b>LTI:</b></td>
				<td colspan="5">
				<?
				for ($k = 0; $k < $ltiCount; $k++) {
					if ($k > 0) {
						echo ", ";
					}
					echo getPlayerDisplay($ltis[$k], null);
				}
				?>
				</td>
			</tr>
			<?}?>			
						
		</table>
		</td>
	</tr>
<?}?>
</table>